﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FortuneHeavenBAL;
using FortuneHeavenCommon.DataMap;
using FortuneHeaven.Admin.Common;

namespace FortuneHeaven.Admin.Pages.Shop
{
    public partial class GiftAuditDetail : FortuneHeaven.Admin.Common.PageBase
    {
        public override string PageID
        {
            get { return "F24"; }
        }
        private string pre = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    GiftOrderBO giftBO = new GiftOrderBO();
                    AddressBO addressBO = new AddressBO();
                    List<GiftOrder> orders = giftBO.GetGiftOrder(1, 100, Request["id"]);
                    DeliveryAddress address = addressBO.GetInfo(orders[0].AddressID);

                    this.txtAcount.Text = orders[0].UserName;
                    this.txtGift.Text = orders[0].GiftName;
               
                    this.txtAddress.Text = address.DeliverAddress;
                    this.txtContactUser.Text = address.ContactUserName;
                    this.txtNO.Text = address.MobileNumber;
                }
                catch (Exception exp)
                {
                    TransferErrorPage();
                }
            }

        }

        public string Pre
        {
            get
            {
                if (!string.IsNullOrEmpty(pre))
                    return pre;
                else
                    pre = Server.UrlDecode(Request["pre"]);
                return pre;
            }
        }

        public void RetPre(object sender, EventArgs arg)
        {
            Response.Redirect(Pre);
        }

        
    }
}